import { reactive, ref } from "vue";

export default function InitHook() {
  const tableRef = ref<any>(null);
  const loading = ref<boolean>(false);
  const selectRow = ref<Base.GeneraDataType | null>(null);
  const tableData = ref<Array<Base.GeneraDataType>>([]);
  const dialogOpts = reactive<Base.DialogOpts>({
    title: "",
    width: "520px",
    component: "",
    visible: false,
    type: 1,
    passData: {}
  });

  return {
    tableData,
    dialogOpts,
    loading,
    selectRow,
    tableRef
  };
}
